# from ExcelDemo import ExcelUtils as eu
from ExcelDemo.ExcelUtils import ExcelUtils
import os

if __name__ == '__main__':

    path = os.curdir+'/ExcelDemo/xlwt_file.xls'
    eut = ExcelUtils(path)

    # print(eut.Path)
    #
    #
    # if eut.isFileExists():
    #     print('文件存在')
    #     eut.delFile()
    # else:
    #     print('文件不存在')
    #     eut.createExcel()

    # 判断是否是类的实例对象
    # if isinstance(eut,ExcelUtils):
    #     print('true')
    # else:
    #     print('false')

    # 判断是否是类的子类
    # if issubclass(ExcelUtils,object):
    #     print('true')
    # else:
    #     print('false')


    wb = eut.WorkBook
    print(wb)
    print(wb.sheet_names())
    table = wb.sheet_by_index(0)
    rows = table.nrows
    cols = table.ncols

    print(rows,'\t',cols)

    for i in range(rows):
        for j in range(cols):
            print(table.cell_value(i,j))
        # print('\r')